<h1><?php echo html::specialchars($topic->title) ?></h1>

<p>
	<a href="#postform">Reply to this topic</a> (currently <?php echo $topic->post_count ?> replies)
	or
	<a href="<?php echo url::site('pianissiboard/feed/topic/'.$topic->id) ?>">subscribe to this topic</a>.
</p>

<ul>
<?php foreach ($posts as $post) { ?>

	<li id="post-<?php echo $post->id ?>">
		<a href="#post-<?php echo $post->id ?>">#</a>
		<?php echo html::specialchars($post->post) ?>
		by <?php echo html::specialchars($post->author) ?>
	</li>

<?php } ?>
</ul>

<?php echo $pagination ?>

<p>
<?php if ($topic->closed) { ?>
	This topic is closed.
<?php } else { ?>

	<?php include Kohana::find_file('views', 'pianissiboard/postform') ?>

<?php } ?>
</p>